/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author XPF
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface SportsIndexBonusRules extends BasicModel<SportsIndexBonusRules> {
  bonusRulesId?: string; // 加分规则主键
  indexId?: string; // 关联指标项
  adaptGrade?: string; // 适配年级
  score?: string; // 对应单项指标评分100分后，超出的测评值
  adaptSex?: string; // 性别
  bonusPoints?: string; // 加分值
  isDelete?: string; // 删除标记
}

export const sportsIndexBonusRulesList = (params?: SportsIndexBonusRules | any) =>
  defHttp.get<SportsIndexBonusRules>({ url: adminPath + '/sports/sportsIndexBonusRules/list', params });

export const sportsIndexBonusRulesListData = (params?: SportsIndexBonusRules | any) =>
  defHttp.post<Page<SportsIndexBonusRules>>({ url: adminPath + '/sports/sportsIndexBonusRules/listData', params });

export const sportsIndexBonusRulesForm = (params?: SportsIndexBonusRules | any) =>
  defHttp.get<SportsIndexBonusRules>({ url: adminPath + '/sports/sportsIndexBonusRules/form', params });

export const sportsIndexBonusRulesSave = (params?: any, data?: SportsIndexBonusRules | any) =>
  defHttp.postJson<SportsIndexBonusRules>({ url: adminPath + '/sports/sportsIndexBonusRules/save', params, data });

export const sportsIndexBonusRulesDelete = (params?: SportsIndexBonusRules | any) =>
  defHttp.get<SportsIndexBonusRules>({ url: adminPath + '/sports/sportsIndexBonusRules/delete', params });
